home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970626-19970929 / 000214_news@newsmaster….columbia.edu _Thu Aug 21 22:58:21 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id WAA09054
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 21 Aug 1997 22:58:21 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id WAA11261
  7.     for kermit.misc@watsun; Thu, 21 Aug 1997 22:58:20 -0400 (EDT)
  8. Path: news.columbia.edu!sol.ctr.columbia.edu!news.indiana.edu!vixen.cso.uiuc.edu!news-peer.sprintlink.net!news.sprintlink.net!Sprint!cs.utexas.edu!news.cs.utah.edu!cc.usu.edu!jrd
  9. From: jrd@cc.usu.edu (Joe Doupnik)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: echo command works differently between 3.14 and 3.15
  12. Message-ID: <PYDViO7VXbx1@cc.usu.edu>
  13. Date: 21 Aug 97 15:21:43 MDT
  14. References: <33f9b133.266082@news.calvacom.fr>
  15. Organization: Utah State University
  16. Lines: 77
  17. Xref: news.columbia.edu comp.protocols.kermit.misc:7529
  18.  
  19. In article <33f9b133.266082@news.calvacom.fr>, do11@calva.net (Dominique Ottello) writes:
  20. > Hello from France.
  21. > I apologize for my wrong English. I hope you understand me.
  22. > I think there is a problem with echo command within a take file between
  23. > MS-DOS Kermit 3.14 and 3.15 beta 21
  24. > With MS-DOS Kermit 3.14 both the macro Disp and the echo command will
  25. > display "Yes" in green (With ANSI.SYS loaded).
  26. > With MS-DOS Kermit 3.15 only the macro Disp displays "Yes" in green.
  27. > Echo command displays the contents of macro's Ge and No.
  28. > ANSI escape sequences are not correctly executed when these sequences are
  29. > within a macro inside an echo command.
  30. >             (See macro and commands hereunder)
  31. > ; Displays White  on Blue
  32. > assign No \27[0;1;37;44m
  33. > ; Displays Green  on Blue
  34. > assign Ge \27[0;1;32;44m
  35. > assign Disp echo {From Macro Disp : \m(Ge)Yes\m(No)}
  36. > Disp
  37. > echo {From Echo Command : \m(Ge)Yes\m(No)}
  38. ---------
  39.     Translating this into words for other readers, ASSIGN evaluates
  40. its arguments before storing the result into the named variable. DEFINE
  41. does not. Neither changes \numbers to binary form.
  42.         Next, processing \m(macro-name) is a parallel process to reducing
  43. \numbers, not an iterative one. That's the key here. 
  44. Macro DISP receives argument  
  45.     echo {From Macro Disp: \27[0;1;32;44mYes\27[0;1;37;44m}
  46. where the \m(macro-name) parts have had their contents substituted.
  47. Invoking macro DISP causes the above string to be passed through the parser
  48. again by the ECHO command, and ECHO asks for \numbers to be converted to
  49. binary format.
  50.     Then the single ECHO command below it sees not that \number style
  51. string but rather \m(macro-name) string, \m(name) items are parsed to their
  52. replacment text, and thus ECHO sees literal \27[ etc characters. \number and 
  53. \m(name) are parallel but not self-calling in MSK 3.15. Thus we see \27[  etc
  54. on the screen.
  55.     Or in simpler terms, \numbers are not substitution variables.
  56.     MSK 3.14 did \number conversion in individual commands such as ECHO,
  57. and hence in series with substitution variable work by the parser, but MSK 
  58. 3.15 moved \num conversion into the parser in parallel with substitution 
  59. variables.
  60.     Now one may well ask if this is a good thing or not, and to be honest
  61. at the moment it could be either. What it is is a change from MSK 3.14 because
  62. the parsing code has had a major upgrade. The manner of parsing \numbers has
  63. changed between versions, and I am hesitant to revise it again for fear of 
  64. breaking a lot of things in an extremely intricate section of code.
  65.     Nevertheless, I'll have a look at it over the weekend to see if there
  66. is a compromise of reasonable proportions.
  67.  
  68. > Is it a bug or a new feature of 3.15 version ?
  69.  
  70.     Feature, FEATURE, F E A T U R E. Why are people snickering? Hush.
  71. See my last sentence above.
  72.     Thanks,
  73.     Joe D.
  74. ----------
  75. > I am not able to find any explanations in the MSK315.DOC file.
  76. > If it is a new feature, it will be very hard to move my applications under
  77. > version 3.15 because there are many commands like :
  78. >     echo {\27[\m(Line);\m(Column)H\m(Ge)Yes\m(No)}
  79. > to put a green "Yes" on defined screen areas
  80. > Nevertheless I am very interested by version 3.15 with local variables,
  81. > declare arrays, minput, switch, \Feval(), for, while, xif, if else and
  82. > other improvements.
  83. >  
  84. >  Best regards,
  85. > == Dominique Ottello == do11@calva.net == Paris == France ==